package com.jiucang.dataview.mybatis.service.impl;

import com.jiucang.dataview.mybatis.bean.User;
import com.jiucang.dataview.mybatis.mapper.db1.UserMapper1;
import com.jiucang.dataview.mybatis.mapper.db2.UserMapper2;
import com.jiucang.dataview.mybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper1 mapper1;
    @Autowired
    private UserMapper2 mapper2;

    public List<User> getDb1Users(){
        return mapper1.getUsers();
    }

    public List<User> getDb2Users(){
        return mapper2.getUsers();
    }
}
